//
//  PHUserInfo.h
//  PhnixHome
//
//  Created by Levy Xu on 2018/1/3.
//  Copyright © 2018年 Levy Xu. All rights reserved.
//

#import <Foundation/Foundation.h>


typedef void(^FinishBlock)(BOOL success);

@interface PHUserInfo : NSObject

@property(nonatomic, strong) NSString *user_id;
@property(nonatomic, strong) NSString *img;
@property(nonatomic, strong) NSString *phone;
@property(nonatomic, strong) NSString *email;
@property(nonatomic, strong) NSString *nick_name;
@property(nonatomic, strong) NSString *user_name;
@property(nonatomic, strong) NSString *sex;
@property(nonatomic, strong) NSString *address;
@property(nonatomic, strong) NSString *birthday;

-(NSString *)genderString;

-(NSString *)account;

-(NSMutableDictionary *)modifyDict;

@end

UIKIT_EXTERN NSString *const kUserInfoChangedNotification;

#define GGlobalUser [GlobalUser sharedGlobalUser]

@interface GlobalUser : NSObject

SingletonH(GlobalUser)

@property(nonatomic, strong) PHUserInfo *info;

-(void)getUserInfo:(BOOL)animated finish:(FinishBlock)finish;

-(void)uploadThirdAvatar:(NSString *)urlString;

-(void)uploadAvatar:(UIImage *)image;

-(void)modify:(NSDictionary *)dict;

@end
